package pt.compflow.interfaces.task;

import pt.compflow.interfaces.InterfaceListener;


public interface TaskInterfaceListener extends InterfaceListener {

	/**
	 * Invoked when an assignment is solved by a worker
	 * Returns true if there are more assignments pending for this task
	 * @param assignmentUri of the solved assignment
	 * @param workerUri of the worker that solved the assignment
	 * @param interfaceUri of the interface that handled the assignment 
	 */
	public boolean onAssignmentSolved(String jobUri, String taskUri, String assignmentUri, String workerUri, String interfaceUri);

	/**
	 * Invoked when a Task is accepted by a worker
	 * Returns true if there are assignments pending for this task
	 * @param taskUri of the accepted task
	 * @param workerUri of the worker that accepted the task
	 * @param interfaceUri of the interface that handled the task 
	 */
	public boolean onTaskAccepted(String jobUri, String taskUri, String workerUri, String interfaceUri);

}
